Skip to content

Fix missing release notes#2413

Open
yadij wants to merge 2 commits intosquid-cache:masterfrom
yadij:fix-missing-release-notes
Open

Fix missing release notes#2413
yadij wants to merge 2 commits intosquid-cache:masterfrom
yadij:fix-missing-release-notes

Conversation

@yadij
Copy link
Copy Markdown
Contributor

@yadij yadij commented Apr 26, 2026

Vendors typically use autoreconf to rebuild Squid after
patching the Makefile.am or configure.ac sources. That tool
performs an equivalent to 'make distclean' which erases
RELEASENOTES.html.

Refactor the RELEASENOTES.html creation using automake rules
with transitive dependency and clean support, and automake
variables for tools detected by ./configure are used for the
build. Ensuring that file is always able to be re-created if
missing.

The need to re-generate RELEASENOTES.html adds
the linuxdoc tool to build dependencies where it was
previously only mandatory for release maintainer
to generate the "Bootstrapped sources" tarball.

yadij added 2 commits April 26, 2026 19:36
The linuxdoc tool used to generate release notes
is not optional.
@yadij yadij added S-could-use-an-approval An approval may speed this PR merger (but is not required) backport-to-v7 maintainer has approved these changes for v7 backporting labels Apr 26, 2026
@yadij
Copy link
Copy Markdown
Contributor Author

yadij commented Apr 26, 2026

This problem has been around for a while, preventing certain types of patching by downstream vendors.
It has come to a head and started causing major pain with the new v7 release process.

@kinkie
Copy link
Copy Markdown
Contributor

kinkie commented Apr 26, 2026

The description doesn't fit the actions - on top of what's in it, it also uses variables for tools.
Which is a good thing, but it's either its own PR, or at least should be disclosed in the description

@kinkie
Copy link
Copy Markdown
Contributor

kinkie commented Apr 26, 2026

apart from this, LGTM

@kinkie kinkie added the S-waiting-for-author author action is expected (and usually required) label Apr 26, 2026
@yadij
Copy link
Copy Markdown
Contributor Author

yadij commented Apr 26, 2026

The description doesn't fit the actions - on top of what's in it, it also uses variables for tools. Which is a good thing, but it's either its own PR, or at least should be disclosed in the description

That is to ensure that tools identified by ./configure (eg when cross-compiling) are used, not anything located in the shell PATH. Updated the description to say that.

FWIW, I hit the above problem when testing the change to AC_PROG_PATH(LINUXDOC,...) and what $FALSE did without the automake conditional build. The original master code would run local linuxdoc even if the ./configure test detected it unusable, or tried to use a cross-compiler variant binary.

@yadij yadij added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box and removed S-waiting-for-author author action is expected (and usually required) labels Apr 26, 2026
@yadij yadij requested a review from kinkie April 26, 2026 11:37
@rousskov rousskov self-requested a review April 26, 2026 18:32
@kinkie
Copy link
Copy Markdown
Contributor

kinkie commented Apr 27, 2026

That is to ensure that tools identified by ./configure (eg when cross-compiling) are used, not anything located in the shell PATH. Updated the description to say that.

I agree it's valuable, no question.
My only request is that this PR does two things:

  • change the logic so that integrators have an easier, more reliable workflow
  • add the tool detections

I'm not going to ask you to put in the work to separate them, but I do ask you to highlight there's two changes

Copy link
Copy Markdown
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description: Vendors typically use autoreconf to rebuilds Squid ... That tool performs an equivalent to 'make distclean' which erases RELEASENOTES.html.

That (true) statement feels misleading in this PR context because, AFAICT, even make clean erases RELEASENOTES.html (in both official and PR sources): "Vendors" and "autoreconf" could be the motivation for this PR, of course, but the way they are currently mentioned is a red herring -- regular users rebuilding Squid under regular conditions erase RELEASENOTES.html as well. Please rephrase PR description to address this concern.

PR description: Ensuring that file is always able to be re-created if missing.

It is difficult for me to understand what this PR has changed at the top level (other than introducing a linuxdoc availability as make dist success precondition, and even that conclusion requires some guessing!).

Please rephrase PR title and description to be more specific, highlighting the top-level/primary change to RELEASENOTES.html creation targets. For example, "Prior to this changes, make ... created RELEASENOTES.html. Now, make dist creates it." Same for the primary target that erases that generated file (if that target has changed).

< $< >$@
$(SED) \
-e "s%[@]SQUID_VERSION[@]%$(VERSION)%g" \
-e "s%[@]SQUID_RELEASE[@]%$(SQUID_RELEASE)%g" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, RELEASENOTES.html still contains an unresolved @PACKAGE_VERSION macro AFAICT. Since this PR removes ENABLE_RELEASE_DOCS protections -- exposing this code to more build cases/environments, it may be a good idea to fix this in this PR, but I do not insist on that.

Comment thread configure.ac

AC_PATH_PROG(LINUXDOC, linuxdoc, $FALSE)
AM_CONDITIONAL(ENABLE_RELEASE_DOCS, test "x${ac_cv_path_LINUXDOC}" != "x$FALSE")
AC_PATH_PROG(LINUXDOC, linuxdoc, [:])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not set $LINUXDOC binary name to : (when linuxdoc is not found). Doing so is conceptually wrong and creates confusing make dist results.

test `grep -c "@SQUID" release-8.sgml` -eq 0
: -B html -T 2 --split=0 release-8.sgml && \
  /usr/bin/perl -i -p -e "s%release-8.html%%" release-8.html
Can't open release-8.html: No such file or directory.

-e "s%[@]SQUID_RELEASE[@]%$(SQUID_RELEASE)%g" \
-e "s%[@]SQUID_RELEASE_OLD[@]%$$(( $(SQUID_RELEASE) - 1 ))%g" \
< $< >$@
test `grep -c "@SQUID" $@` -eq 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, this target and/or this particular test is broken: This target should fail when $@ does not exist but it actually succeeds. Since this PR removes ENABLE_RELEASE_DOCS protections -- exposing this code to more build cases/environments, it may be a good idea to fix this in this PR, but I do not insist on that.

Comment thread Makefile.am
RELEASENOTES.html: html
cp -p $(builddir)/doc/release-notes/release-$(SQUID_RELEASE).html $@

CLEANFILES = RELEASENOTES.html
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If make dist generates RELEASENOTES.html and make does not, should not that file be cleaned by make distclean instead of make clean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v7 maintainer has approved these changes for v7 backporting S-could-use-an-approval An approval may speed this PR merger (but is not required) S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants